package cn.com.api.mapper.base;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import cn.com.api.entity.ApiU_circle_img;

//DAO
public interface U_circle_imgMapperBase {

	// 根据id查看
	@Select("SELECT * FROM U_CIRCLE_IMG  WHERE ID = #{id}")
	public ApiU_circle_img findU_circle_imgById(Integer id);

	// 查看数据集
	@Select("SELECT * FROM U_circle_img")
	public List<ApiU_circle_img> findU_circle_imgs();

	// 根据条件查看数据集
	public List<Map<String, Object>> findU_circle_imgsByMap(HashMap condition);

	// 添加
	@Insert("INSERT INTO U_CIRCLE_IMG (CIRCLE_ID, IMG, SORT) VALUES (#{circle_id}, #{img}, #{sort})")
	@Options(useGeneratedKeys = true, keyProperty = "id")
	public int insertU_circle_img(ApiU_circle_img u_circle_img);

	// 修改
	@Update("UPDATE U_CIRCLE_IMG SET CIRCLE_ID = #{circle_id}, IMG = #{img}, SORT = #{sort} WHERE ID = #{id}")
	public int updateU_circle_img(ApiU_circle_img u_circle_img);

	// 删除
	@Delete("DELETE FROM U_CIRCLE_IMG  WHERE ID = #{id}")
	public int deleteU_circle_img(Integer id);

	// Foreign keys revelant

	// region Indexs revelant

}
